﻿#include "mywidget.h"
#include "ui_mywidget.h"

#include <QPushButton>

MyWidget::MyWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::MyWidget)
{
    ui->setupUi(this);
    QPushButton *button = new QPushButton("点击关闭窗口", this);
    this->resize(600,400);
    connect(button, &QPushButton::clicked, this, &MyWidget::close);

}

MyWidget::~MyWidget()
{
    delete ui;
}
